<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\User;

class UserMsg extends \Service\Common\BaseModel
{
    protected $name = 'user_msg';


    //列表
    public function UserMsgLists($uid, $status, $page_num, $page_size)
    {

        $where = [
            'uid' => $uid,
        ];
        $list = (array)$this->where($where)->order('id desc')->page($page_num, $page_size)->select();
        $count = $this->where($where)->count();
        return [
            $list,
            $page_count = $count,
            $page_total = ceil($count / $page_size)
        ];
    }
}